using System;
using System.IO;
using System.Linq;

public class MovingCodeTaskPojo
{

  public MovingCodeTaskPojo(TaskPojo[] public_files, TaskPojo[] private_files)
  {
    this.public_files = public_files;
    this.private_files = private_files;
  }

  public TaskPojo[] public_files { get; set; }

  public TaskPojo[] private_files { get; set; }

  public bool IsToPathExists()
  {
    return this.public_files.Any(task => File.Exists(task.toFp))
    || this.private_files.Any(task => File.Exists(task.toFp));
  }

  public void PublicfilesFor(Action<TaskPojo> function)
  {
    foreach (var task in this.public_files)
    {
      function(task);
    }
  }

  public void PrivatefilesFor(Action<TaskPojo> function)
  {
    foreach (var task in this.private_files)
    {
      function(task);
    }
  }

}

public class TaskPojo
{
  public TaskPojo(string fromFp, string toFp)
  {
    this.fromFp = fromFp;
    this.toFp = toFp;
  }

  public string fromFp { get; set; }
  public string toFp { get; set; }
}
